package com.gp.model.entity;

import java.io.Serializable;
import java.util.Date;

import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.NotBlank;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.wordnik.swagger.annotations.ApiModel;
import com.wordnik.swagger.annotations.ApiModelProperty;

/**
 * 
 * @author 王柔
 *
 */
@TableName("base_goods")
@ApiModel
public class BaseGoods extends Model<BaseGoods> {

  private static final long serialVersionUID = 1L;

  @ApiModelProperty(value = "id", required = false)
  private Long id;
  @ApiModelProperty(value = "商品名称", required = false)
  private String goodsName;
  @ApiModelProperty(value = "商品特色", required = false)
  private String characterDesc;
  @ApiModelProperty(value = "商品状态", required = false)
  private String state;
  @ApiModelProperty(value = "审核状态", required = false)
  private String auditStatus;
  @ApiModelProperty(value = "价格", required = false)
  private Long price;
  @ApiModelProperty(value = "市场价", required = false)
  private Long marketPrice;
  @ApiModelProperty(value = "送货时限", required = false)
  private String deliveryLimit;
  @ApiModelProperty(value = "图片", required = false)
  @NotBlank
  private String images;
  @ApiModelProperty(value = "重量", required = false)
  private String weight;
  @ApiModelProperty(value = "是否推荐", required = false)
  private String isrec;
  @ApiModelProperty(value = "上线时间", required = false)
  private Date upTime;
  @ApiModelProperty(value = "下线时间", required = false)
  private Date downTime;
  @ApiModelProperty(value = "是否可退货", required = false)
  private String returnRule;
  @ApiModelProperty(value = "是否可换货", required = false)
  private String exchangeRule;
  @ApiModelProperty(value = "商品运费（分）", required = false)
  private String freight;
  @ApiModelProperty(value = "库存", required = false)
  @NotNull
  private Integer stock;
  @ApiModelProperty(value = "描述", required = false)
  private String characteristic;

  /**
   * 自定义填充的创建时间
   */
  @TableField(fill = FieldFill.INSERT) // 该注解插入忽略验证，自动填充
  private Date createTime;
  /**
   * 自定义填充的最后一次修改时间
   */
  @TableField(fill = FieldFill.UPDATE) // 该注解插入忽略验证，自动填充
  private Date lastmodifiedTime;

  @ApiModelProperty(value = "规格", required = false)
  private String specarray;

  public BaseGoods() {}

  public BaseGoods(Long id, String goodsName, String characterDesc, String state,
      String auditStatus, Long price, Long marketPrice, String deliveryLimit, String images,
      String weight, String isrec, Date upTime, Date downTime, String returnRule,
      String exchangeRule, String freight, Integer stock, String characteristic) {
    this.id = id;
    this.goodsName = goodsName;
    this.characterDesc = characterDesc;
    this.state = state;
    this.auditStatus = auditStatus;
    this.price = price;
    this.marketPrice = marketPrice;
    this.deliveryLimit = deliveryLimit;
    this.images = images;
    this.weight = weight;
    this.isrec = isrec;
    this.upTime = upTime;
    this.downTime = downTime;
    this.returnRule = returnRule;
    this.exchangeRule = exchangeRule;
    this.freight = freight;
    this.stock = stock;
    this.characteristic = characteristic;
  }

  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public String getGoodsName() {
    return goodsName;
  }

  public void setGoodsName(String goodsName) {
    this.goodsName = goodsName;
  }

  public String getCharacterDesc() {
    return characterDesc;
  }

  public void setCharacterDesc(String characterDesc) {
    this.characterDesc = characterDesc;
  }

  public String getState() {
    return state;
  }

  public void setState(String state) {
    this.state = state;
  }

  public String getAuditStatus() {
    return auditStatus;
  }

  public void setAuditStatus(String auditStatus) {
    this.auditStatus = auditStatus;
  }

  public Long getPrice() {
    return price;
  }

  public void setPrice(Long price) {
    this.price = price;
  }

  public Long getMarketPrice() {
    return marketPrice;
  }

  public void setMarketPrice(Long marketPrice) {
    this.marketPrice = marketPrice;
  }

  public String getDeliveryLimit() {
    return deliveryLimit;
  }

  public void setDeliveryLimit(String deliveryLimit) {
    this.deliveryLimit = deliveryLimit;
  }

  public String getImages() {
    return images;
  }
  
  public void setImages(String images) {
    this.images = images;
  }

  public String getWeight() {
    return weight;
  }

  public void setWeight(String weight) {
    this.weight = weight;
  }

  public String getIsrec() {
    return isrec;
  }

  public void setIsrec(String isrec) {
    this.isrec = isrec;
  }

  public Date getUpTime() {
    return upTime;
  }

  public void setUpTime(Date upTime) {
    this.upTime = upTime;
  }

  public Date getDownTime() {
    return downTime;
  }

  public void setDownTime(Date downTime) {
    this.downTime = downTime;
  }

  public String getReturnRule() {
    return returnRule;
  }

  public void setReturnRule(String returnRule) {
    this.returnRule = returnRule;
  }

  public String getExchangeRule() {
    return exchangeRule;
  }

  public void setExchangeRule(String exchangeRule) {
    this.exchangeRule = exchangeRule;
  }

  public String getFreight() {
    return freight;
  }

  public void setFreight(String freight) {
    this.freight = freight;
  }

  public Integer getStock() {
    return stock;
  }

  public void setStock(Integer stock) {
    this.stock = stock;
  }

  public String getCharacteristic() {
    return characteristic;
  }

  public void setCharacteristic(String characteristic) {
    this.characteristic = characteristic;
  }

  public Date getCreateTime() {
    return createTime;
  }

  public void setCreateTime(Date createTime) {
    this.createTime = createTime;
  }

  public Date getLastmodifiedTime() {
    return lastmodifiedTime;
  }

  public void setLastmodifiedTime(Date lastmodifiedTime) {
    this.lastmodifiedTime = lastmodifiedTime;
  }

  public String getSpecarray() {
    return specarray;
  }

  public void setSpecarray(String specarray) {
    this.specarray = specarray;
  }

  @Override
  public String toString() {
    return "BaseGoods [id=" + id + ", goodsName=" + goodsName + ", characterDesc=" + characterDesc
        + ", state=" + state + ", auditStatus=" + auditStatus + ", price=" + price
        + ", marketPrice=" + marketPrice + ", deliveryLimit=" + deliveryLimit + ", images=" + images
        + ", weight=" + weight + ", isrec=" + isrec + ", upTime=" + upTime + ", downTime="
        + downTime + ", returnRule=" + returnRule + ", exchangeRule=" + exchangeRule + ", freight="
        + freight + ", stock=" + stock + ", characteristic=" + characteristic + ", createTime="
        + createTime + ", lastmodifiedTime=" + lastmodifiedTime + ", specarray=" + specarray + "]";
  }

  @Override
  protected Serializable pkVal() {
    return this.serialVersionUID;
  }
}
